package com.star.batchhandler.demo;

import java.util.Map;
import java.util.Set;

import javax.sql.DataSource;

import com.star.platform.common.AbstractBundleServiceActivator;
import com.star.platform.transaction.inter.ITransactionService;
public class Activator extends AbstractBundleServiceActivator {

	@Override
	protected void trackerService(Set<Class<?>> serviceClasse) {
		serviceClasse.add(DataSource.class);
		serviceClasse.add(ITransactionService.class);
	}

	@Override
	protected void doServicesReady(Map<Class<?>, Object> services) {
		DataSource ds = (DataSource)services.get(DataSource.class);
		ITransactionService tx = (ITransactionService)services.get(ITransactionService.class);
		try {
//			new SQLOperation(ds,tx);
			new SQLBatchOperation(ds,tx);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
